﻿@model SelfMadeMillionaire.Web.Infrastructure.ViewModels.TrackingPortfolio.TrackingPortfolioViewModel
@using SelfMadeMillionaire.Web.Infrastructure
@{
	Layout = "~/Areas/Admin/Views/Shared/_AdminLayout.cshtml";
}


@using (Html.BeginForm("Index", "TrackingPortfolio", FormMethod.Post, new { @class = "form-horizontal" }))
{
	@Html.HiddenFor(m=>m.TPtype)
		
	<div class="row">
		<div class="col-sm-4">
			<table class="table table-bordered">
				<thead>
					<tr>
						<th width="40%" style="text-align:center;"><h3>Index</h3></th>
                        <th width="30%" style="text-align:center;"><h3>Annualized</h3></th>
						<th width="30%" style="text-align:center;"><h3>Return</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>@Html.LabelFor(m => m.TrackingPortfolio, new { @class = "control-label" })</td>
						<td>@Html.TextBoxFor(m => m.TrackingPortfolio, new { @class = "form-control" })
							@Html.ValidationMessageFor(m => m.TrackingPortfolio)</td>
                        <td>@Html.TextBoxFor(m => m.TrackingPortfolioReturn, new { @class = "form-control" })
							@Html.ValidationMessageFor(m => m.TrackingPortfolioReturn)</td>
					</tr>
					<tr>
						<td>@Html.LabelFor(m => m.DowIndustrials, new { @class = "control-label" })</td>
						<td>@Html.TextBoxFor(m => m.DowIndustrials, new { @class = "form-control" })
							@Html.ValidationMessageFor(m => m.DowIndustrials)</td>
                        <td>@Html.TextBoxFor(m => m.DowIndustrialsReturn, new { @class = "form-control" })
							@Html.ValidationMessageFor(m => m.DowIndustrialsReturn)</td>
					</tr>
					<tr>
						<td>@Html.LabelFor(m => m.SP500, new { @class = "control-label" })</td>
						<td>@Html.TextBoxFor(m => m.SP500, new { @class = "form-control" })
							@Html.ValidationMessageFor(m => m.SP500)</td>
                        <td>@Html.TextBoxFor(m => m.SP500Return, new { @class = "form-control" })
							@Html.ValidationMessageFor(m => m.SP500Return)</td>
					</tr>
					<tr>
						<td>@Html.LabelFor(m => m.Nasdaq, new { @class = "control-label" })</td>
						<td>@Html.TextBoxFor(m => m.Nasdaq, new { @class = "form-control" })
							@Html.ValidationMessageFor(m => m.Nasdaq)</td>
                        <td>@Html.TextBoxFor(m => m.NasdaqReturn, new { @class = "form-control" })
							@Html.ValidationMessageFor(m => m.NasdaqReturn)</td>
					</tr>
				</tbody>
			</table>

		</div>
		<div class="col-sm-4">
			<div class="form-group">
				@Html.LabelFor(model => model.FromDate, new { @class = "col-sm-6 control-label" })
				<div class="col-sm-6">
					@Html.TextBoxFor(model => model.FromDate, "{0:" + Constants.DATE_FORMAT + "}", new { @class = "form-control" })
					@Html.ValidationMessageFor(model => model.FromDate)
				</div>
			</div>
			<div class="form-group">
				@Html.LabelFor(model => model.ToDate, new { @class = "col-sm-6 control-label" })
				<div class="col-sm-6">
					@Html.TextBoxFor(model => model.ToDate, "{0:" + Constants.DATE_FORMAT + "}", new { @class = "form-control" })
					@Html.ValidationMessageFor(model => model.ToDate)
				</div>
			</div>
		</div>

	</div>
	
	<div class="row">
		<div class="col-sm-12">
			<div class="pull-left">
				<button type="submit" class="btn btn-default width80">Save</button>
			</div>
		</div>
	</div>
}

<script type="text/javascript">
	$(function () {

	    RemoveTime("#@Html.IdFor(m=>m.FromDate)");
	    RemoveTime("#@Html.IdFor(m=>m.ToDate)");
	    $("#@Html.IdFor(m => m.FromDate), #@Html.IdFor(m => m.ToDate)").datepicker();

	});

</script>
